1. Field of the Invention
The present invention relates to an image-data processing apparatus and in particular to such a processing apparatus which processes multilevel image data representing a continuous-tone or half-tone image, into bilevel image data representing a bilevel image corresponding to the half-tone image.
2. Related Art Statement
There is known a digital electrophotographic copier or a thermal or ink-jet printer which has an image-data processing device.
In conventional image-data processing devices, there have widely been used various sorts of dither processes such as a systematic dither process wherein multilevel image data are processed into bilevel image data by using a threshold table or matrix (i.e., dither matrix). However, in those processes, a larger matrix is needed to obtain a higher reproducibility of the half-tone image; and a smaller matrix is needed to obtain a higher resolution of the bilevel image. Thus, the two requirements are not compatible with each other.
There is known an error diffusion process wherein a higher reproducibility of a half-tone image and a higher resolution of a bilevel image are compatible with each other. The error diffusion process has been regarded relatively well in the conventional image-data processing methods.
Hereinafter, a known error diffusion process is described by reference to FIGS. 13 to 15 and FIG. 2.
FIG. 13 shows a conventional image-data processing device which carries out an error diffusion process; FIG. 14 shows a flow chart representing a control program according to which the device of FIG. 13 operates for processing multilevel image data into bilevel image data; and FIG. 15 shows a bilevel image output by an output device (e.g., a recorder or a display, not shown) of the device of FIG. 13. In the error diffusion process, the same weighing-coefficient matrix as shown in FIG. 2 is used by the device of FIG. 13.
In the following description relating to the prior art device of FIG. 13, it is assumed that a batch of multilevel image data representing a half-tone image consists of a number of sets of multilevel pixel data each of which can take one of 0 to 255 integral values, is processed into a corresponding one of a number of sets of bilevel pixel data of a batch of bilevel image data representing a bilevel image corresponding to the half-tone image. Each set of bilevel pixel data can take one of 0 and 255 values. Each set of bilevel pixel data may be modified into a modified set of bilevel pixel data which can take one of 0 and 1 values which correspond to the initial 0 and 255 values, respectively.
The prior art apparatus of FIG. 13 includes an input image data storing device or first memory 102 which stores, as input digital image data, multilevel image data representing an original continuous- or half-tone image. The apparatus further includes a random access memory (RAM) 103 which operates as a working register or data buffer, a read only memory (ROM) 104, and a central processing unit (CPU) 105 which reads the multilevel image data from the first memory 102 and processes the multilevel image data into bilevel image data representing a bilevel image corresponding to the original half-tone image, according to a control program pre-stored in the ROM 104, by utilizing a temporary-storage function of the RAM 103. The RAM 103, ROM 104, and CPU 105 cooperate with each other to provide a data processing device which processes multilevel image data into bilevel image data by an error diffusion process. The conventional apparatus further includes an output image data storing device or second memory 106 which stores the bilevel image data produced by the data processing device 103, 104, 105.
The ROM 104 stores a weighing-coefficient matrix, shown in FIG. 2, which is used in the error diffusion process. A symbol, e, indicates an error value which occurs in processing each set of multilevel pixel data of a batch of multilevel image data, into a corresponding one set of bilevel pixel data of a batch of bilevel image data. A batch of multilevel image data consists of a number of sets of multilevel pixel data each set of which represents one of 256 color values (i.e., integral numbers of 0 to 255) as an input color value indicating a color of a corresponding one (indicated at symbol, *, in FIG. 2) of a number of pixels (i.e., picture elements) of an original half-tone image, and which is processed into a corresponding one of a number of sets of bilevel pixel data of a batch of bilevel image data so that the corresponding one set of bilevel pixel data represents one of two color values (i.e., integral numbers of 0 and 255) as an output color value indicating a color of a corresponding one of a number of pixels of a bilevel image. The error value e is divided into twelve error values according to the respective weighing coefficients of the matrix, and the thus obtained twelve weighed error values are distributed to twelve first pixels which neighbor the current pixel indicated at symbol * and correspond to twelve sets of multilevel pixel data yet to be processed by the data processing device 103, 104, 105.
The ROM 104 also stores a fixed threshold, T.sub.fix, which is compared with a corrected input color value, I', (described later) in the error diffusion process.
The image-data processing apparatus of FIG. 13 operates according to the control program pre-stored in the ROM 104 and represented by the flow chart of FIG. 14. First, at Step S101, the CPU 15 reads, from the first memory 102, the first set of multilevel pixel data of the multilevel image data stored therein which represents an input color value, I, indicating the color of the left top pixel of the original half-tone image represented by the multilevel image data. Step S101 is followed by Step S102 to read the fixed threshold T.sub.fix from the R0M 104. The threshold T.sub.fix is not changed or replaced with any other value, i.e., constant for all the input color values I. Generally, the fixed threshold T.sub.fix is selected at a median value of an input-color-value range within which the parameter I is variable. Since each set of multilevel pixel data can take one of 0 to 255 integral values, the threshold T.sub.fix is fixed at 128.
Step S102 is followed by Step S103 to read, from the RAM 103, a sum, E, of respective weighed error values distributed, according to the matrix shown in FIG. 2, to the current pixel indicated at symbol *, from neighboring sixteen pixels which have already been processed. The sum E is added to the input color value I of the current pixel to determine a corrected input color value, I', which is compared with the fixed threshold T.sub.fix at Step S104.
If the corrected first value I' satisfies the following expression: I'.gtoreq.T.sub.fix, that is, if the input value I and the sum E satisfy the following expression: I+E.gtoreq.128, the CPU 105 determines, at Step S105, an output color value, O=255, indicating the color of a corresponding pixel of the bilevel image, and produces a set of bilevel pixel data representing the output value O=255. On the other hand, if the corrected first value I' does not satisfy the expression: I'.gtoreq.T.sub.fix, that is, if the input value I and the sum E do not satisfy the expression: I+E.gtoreq.128, the CPU 105 determines, at Step S106, an output color value, O=0, indicating the color of a corresponding pixel of the bilevel image, and produces a set of bilevel pixel data representing the output value O=0.
At Step S107, the CPU 105 writes, in the second memory 106, a modified set of bilevel pixel data representing a value, 1, corresponding to the output color value O=255, or a modified set of bilevel pixel data representing a value, 0, corresponding to the output value O=0.
At the following step S108, an error value, e, is obtained based on the corrected input color value I' and the output color value O, according the following expression: e=I'-O. At Step S109, the weighing-coefficient matrix of FIG. 2 is read from the ROM 104. The matrix defines an error-value weighing and distributing rule according to which the error value, e (=I'-O), obtained at Step S108 is divided into twelve weighed error values and the twelve weighed error values are distributed to twelve neighboring pixels yet to be processed, respectively, at Step S110. Then, the control of the CPU 105 proceeds with the next pixel, i.e., the set of multilevel pixel data representing the input color value of the next pixel.
The error value e occurring in processing the current pixel indicated at symbol * in FIG. 2 is multiplied by each of the twelve weighing coefficients of the matrix and is distributed to a corresponding neighboring pixel. The RAM 103 includes a data buffer which accumulatively stores, as the sum E, respective weighed error values distributed to each pixel from twelve neighboring pixels which have been processed using the matrix of FIG. 2.
The above operation is repeated with respect to each set of multilevel pixel data of the multilevel image data.
However, the conventional error diffusion process suffers from the following problem:
The input color values represented by the sets of multilevel pixel data for the pixels around an edge or edges of the half-tone image change largely and sharply. However, the sum E of the weighed error values distributed to each pixel cannot influence the result of comparison of the corrected input value I' (=I+E) with the fixed threshold T.sub.fix, until the absolute value of the sum E increases up to the difference between the input value I and the fixed threshold T.sub.fix. Consequently the recording or displaying of the pixels of the bilevel image is biased in the directions of distribution of the error values e.